// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * SalesFlatShipment generated by hbm2java
 */
@Entity
@Table(name = "sales_flat_shipment", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = "increment_id"))
public class SalesFlatShipment implements java.io.Serializable {

	private Integer entityId;
	private SalesFlatOrder salesFlatOrder;
	private CoreStore coreStore;
	private BigDecimal totalWeight;
	private BigDecimal totalQty;
	private Short emailSent;
	private Integer customerId;
	private Integer shippingAddressId;
	private Integer billingAddressId;
	private Integer shipmentStatus;
	private String incrementId;
	private Date createdAt;
	private Date updatedAt;
	private String packages;
	private byte[] shippingLabel;
	private Set salesFlatShipmentComments = new HashSet(0);
	private Set salesFlatShipmentItems = new HashSet(0);
	private SalesFlatShipmentGrid salesFlatShipmentGrid;
	private Set salesFlatShipmentTracks = new HashSet(0);

	public SalesFlatShipment() {
	}

	public SalesFlatShipment(SalesFlatOrder salesFlatOrder) {
		this.salesFlatOrder = salesFlatOrder;
	}

	public SalesFlatShipment(SalesFlatOrder salesFlatOrder,
			CoreStore coreStore, BigDecimal totalWeight, BigDecimal totalQty,
			Short emailSent, Integer customerId, Integer shippingAddressId,
			Integer billingAddressId, Integer shipmentStatus,
			String incrementId, Date createdAt, Date updatedAt,
			String packages, byte[] shippingLabel,
			Set salesFlatShipmentComments, Set salesFlatShipmentItems,
			SalesFlatShipmentGrid salesFlatShipmentGrid,
			Set salesFlatShipmentTracks) {
		this.salesFlatOrder = salesFlatOrder;
		this.coreStore = coreStore;
		this.totalWeight = totalWeight;
		this.totalQty = totalQty;
		this.emailSent = emailSent;
		this.customerId = customerId;
		this.shippingAddressId = shippingAddressId;
		this.billingAddressId = billingAddressId;
		this.shipmentStatus = shipmentStatus;
		this.incrementId = incrementId;
		this.createdAt = createdAt;
		this.updatedAt = updatedAt;
		this.packages = packages;
		this.shippingLabel = shippingLabel;
		this.salesFlatShipmentComments = salesFlatShipmentComments;
		this.salesFlatShipmentItems = salesFlatShipmentItems;
		this.salesFlatShipmentGrid = salesFlatShipmentGrid;
		this.salesFlatShipmentTracks = salesFlatShipmentTracks;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "entity_id", unique = true, nullable = false)
	public Integer getEntityId() {
		return this.entityId;
	}

	public void setEntityId(Integer entityId) {
		this.entityId = entityId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "order_id", nullable = false)
	public SalesFlatOrder getSalesFlatOrder() {
		return this.salesFlatOrder;
	}

	public void setSalesFlatOrder(SalesFlatOrder salesFlatOrder) {
		this.salesFlatOrder = salesFlatOrder;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id")
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@Column(name = "total_weight", precision = 12, scale = 4)
	public BigDecimal getTotalWeight() {
		return this.totalWeight;
	}

	public void setTotalWeight(BigDecimal totalWeight) {
		this.totalWeight = totalWeight;
	}

	@Column(name = "total_qty", precision = 12, scale = 4)
	public BigDecimal getTotalQty() {
		return this.totalQty;
	}

	public void setTotalQty(BigDecimal totalQty) {
		this.totalQty = totalQty;
	}

	@Column(name = "email_sent")
	public Short getEmailSent() {
		return this.emailSent;
	}

	public void setEmailSent(Short emailSent) {
		this.emailSent = emailSent;
	}

	@Column(name = "customer_id")
	public Integer getCustomerId() {
		return this.customerId;
	}

	public void setCustomerId(Integer customerId) {
		this.customerId = customerId;
	}

	@Column(name = "shipping_address_id")
	public Integer getShippingAddressId() {
		return this.shippingAddressId;
	}

	public void setShippingAddressId(Integer shippingAddressId) {
		this.shippingAddressId = shippingAddressId;
	}

	@Column(name = "billing_address_id")
	public Integer getBillingAddressId() {
		return this.billingAddressId;
	}

	public void setBillingAddressId(Integer billingAddressId) {
		this.billingAddressId = billingAddressId;
	}

	@Column(name = "shipment_status")
	public Integer getShipmentStatus() {
		return this.shipmentStatus;
	}

	public void setShipmentStatus(Integer shipmentStatus) {
		this.shipmentStatus = shipmentStatus;
	}

	@Column(name = "increment_id", unique = true, length = 50)
	public String getIncrementId() {
		return this.incrementId;
	}

	public void setIncrementId(String incrementId) {
		this.incrementId = incrementId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_at", length = 19)
	public Date getCreatedAt() {
		return this.createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updated_at", length = 19)
	public Date getUpdatedAt() {
		return this.updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	@Column(name = "packages", length = 65535)
	public String getPackages() {
		return this.packages;
	}

	public void setPackages(String packages) {
		this.packages = packages;
	}

	@Column(name = "shipping_label")
	public byte[] getShippingLabel() {
		return this.shippingLabel;
	}

	public void setShippingLabel(byte[] shippingLabel) {
		this.shippingLabel = shippingLabel;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "salesFlatShipment")
	public Set getSalesFlatShipmentComments() {
		return this.salesFlatShipmentComments;
	}

	public void setSalesFlatShipmentComments(Set salesFlatShipmentComments) {
		this.salesFlatShipmentComments = salesFlatShipmentComments;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "salesFlatShipment")
	public Set getSalesFlatShipmentItems() {
		return this.salesFlatShipmentItems;
	}

	public void setSalesFlatShipmentItems(Set salesFlatShipmentItems) {
		this.salesFlatShipmentItems = salesFlatShipmentItems;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "salesFlatShipment")
	public SalesFlatShipmentGrid getSalesFlatShipmentGrid() {
		return this.salesFlatShipmentGrid;
	}

	public void setSalesFlatShipmentGrid(
			SalesFlatShipmentGrid salesFlatShipmentGrid) {
		this.salesFlatShipmentGrid = salesFlatShipmentGrid;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "salesFlatShipment")
	public Set getSalesFlatShipmentTracks() {
		return this.salesFlatShipmentTracks;
	}

	public void setSalesFlatShipmentTracks(Set salesFlatShipmentTracks) {
		this.salesFlatShipmentTracks = salesFlatShipmentTracks;
	}

}
